<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
<title>prev ~ siblings选择器的示例</title>
<style type="text/css">
	.background{background:#cef}
	body{font-size:12px;}
</style>

<script type="text/javascript" src="JS/jquery-3.5.1.min.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$("div~p").addClass("background");
	});
</script>
</head>
<body>
<div>
    <p>第一个p</p>
    <p>第二个p</p>
</div>
<p>div外面的p</p>
</body>
</html>
